﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LineEntry.aspx.cs" Inherits="MTRC.ODMS.Web.SOM.CodeSetup.FireLinkRestoreEntry" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SOM</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link href="../../CSS/common.css" rel="stylesheet" type="text/css" />
    <link href="~/CSS/Menu.css" rel="stylesheet" type="text/css" />
    <script src="../../Javascript/TracePageChange.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function IsInteger(val) {
            var re;
            re = /^[0-9]*[1-9][0-9]*$/;
            return re.exec(val);
        }

        function CheckInt(obj) {
            if (obj.value != "") {
                if (!IsInteger(obj.value)) {
                    obj.value = obj.title;
                    return false;
                }
                else
                    return true;
            }
            else
                return true;
        }
        function Cancel() {
            if (IsServerChanged || IsPageChanged()) {
                if (confirm(LeavePage)) {
                    window.location.href = "LineEnquiry.aspx";
                }
            }
            else {
                window.location.href = "LineEnquiry.aspx";
            }
            return false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" apppath="../../" CurrMenuID="M140920" />
            </td>
            <td class="Page_Right">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140825" ParentMenuID="M140920"
                                DMenuMode="CurrOnly" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents">
                            <fieldset style="clear: both; margin-bottom: 10px;">
                                <legend class="title1">
                                    <asp:Label ID="lblMenuName" runat="server" Font-Bold="True" Font-Size="Small" CssClass="CodeSetupCaptionText">Line Entry</asp:Label></legend>
                                <table cellspacing="1" cellpadding="1" width="85%" border="0">
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblLine" runat="server">Line</asp:Label>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlLine" runat="server" Width="127" AutoPostBack="True" OnSelectedIndexChanged="ddlLine_SelectedIndexChanged" />
                                        </td>
                                        <td colspan="4">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblCode1" runat="server">Code1</asp:Label><em>*</em>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="10" ID="txtCode1"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblDescription1" runat="server">Description1</asp:Label><em>*</em>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="40" ID="txtDescription1"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblCode2" runat="server">Code2</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="10" ID="txtCode2"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblDescription2" runat="server">Description2</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="40" ID="txtDescription2"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblCode3" runat="server">Code3</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="10" ID="txtCode3"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblDescription3" runat="server">Description3</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="40" ID="txtDescription3"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblSequence" runat="server">Sequence</asp:Label><em>*</em>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtSequence" MaxLength="4" onBlur="CheckInt(this)" onkeypress="if (event.keyCode < 48 || event.keyCode >57) event.returnValue = false;"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblBelongsToLineGroup" runat="server">Belongs to line group</asp:Label>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlBelongsToLineGroup" runat="server" Width="127">
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblLineGroup" runat="server">Line group</asp:Label>
                                        </td>
                                        <td style="cursor: pointer">
                                            <asp:CheckBox ID="cbxLineGroup" runat="server" AutoPostBack="True" OnCheckedChanged="cbxLineGroup_CheckedChanged" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblFireLinkStatus" runat="server">Show in Fire Link Panel</asp:Label>
                                        </td>
                                        <td style="cursor: pointer">
                                            <asp:CheckBox ID="cbxShowInFireLinkPanel" runat="server" />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblFontColor" runat="server">Font Color</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox runat="server" MaxLength="20" ID="txtFontColor"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblBackColor" runat="server">Background Color</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtBackColor" runat="server" MaxLength="20" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="cursor: pointer">
                                            <asp:Label ID="lblObsolete" runat="server">Obsolete</asp:Label>
                                            <asp:CheckBox ID="cbxObsolete" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" align="right">
                                            <asp:HiddenField ID="HiddenOriginalCode1" runat="server" />
                                            <asp:HiddenField ID="HiddenSOMLineId" runat="server" />
                                            <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
                                            &nbsp;
                                            <asp:Button ID="btnSaveAndReturn" runat="server" Text="Save&Return" OnClick="btnSaveAndReturn_Click" />
                                            &nbsp;
                                            <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return Cancel();" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </td>
                    </tr>
                    <tr>
                        <div style="display: none">
                            <td class="Page_Foot" style="height: 54px">
                                <WebStructure:PageFoot ID="PageFoot" runat="server" />
                            </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
